import request from '@/utils/request'

export function listSwap(query) {
  return request({
    url: '/warehouse-swap/page',
    method: 'get',
    params: query
  })
}

export function executeSwap(query) {
  return request({
    url: '/warehouse-swap/execute',
    method: 'post',
    params:query
  })
}

export function createSwap(data) {
  return request({
    url: '/warehouse-swap/add',
    method: 'post',
    data
  })
}

export function readSwap(query) {
  return request({
    url: '/warehouse-swap/info',
    method: 'get',
    params:query
  })
}

export function updateSwap(data) {
  return request({
    url: '/warehouse-swap/edit',
    method: 'post',
    data
  })
}

export function deleteSwap(query) {
  return request({
    url: '/warehouse-swap/remove',
    method: 'post',
    params:query
  })
}

export function cancelSwap(query) {
  return request({
    url: '/warehouse-swap/cancel',
    method: 'post',
    params:query
  })
}
